<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<html:html locale="true">

<head>
<html:base/>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Rating</title>
</head>

       <html:form  action="/submitrating?action=addrating"  method="post">


<table border="0" width="100%" cellpadding="0" cellspacing="0"> 
<tr>
				<td align="left" colspan="2" width="50%">
					<p><font size="6" face="Monotype Corsiva"><a href="#" style="color: #6699CC">Expert Advise</a></font></p>				
				</td>     
  </tr>

          <tr bgcolor="#6699CC">
				<td  align="center"  width="25%" class="tablecells" id="nav1" >
					<html:link page="/JSP/Welcome.jsp"><font color="white">Welcome</font></html:link>					
				</td>



			<td width="25%"  class="tablecells" id="nav2" bgcolor="#6fa46f">
			 <html:link page="/DisplaySkillAction.do">
			 <font color="white">Ask</font>			
				</html:link>
			</td>

			<td width="25%" class="tablecells" id="nav3" >
			<%if((String)session.getAttribute("userID") != null){ %> 
			<html:link page="/JSP/Login/logout.jsp" > <font color="white">  Logout </font></html:link> <%}else{%> <html:link page="/JSP/Login/userlogin.jsp" ><font color="white">Member Login</font></html:link>
			<%}%>
			</td>  			
           </tr>
			
<tr> <td colspan="4">&nbsp;</td></tr>
</table>  
<%@ include file="../Includes/asknav.jsp"%>


<center>
<table width="60%" border="0" class="signup"  align="center">
<tr bgcolor="#FBFBEF">
<td>
<p> Question </p>
</td>
<td>
<bean:write name= "RatingsForm" property = "question"/> 
</td>


</tr>
<tr bgcolor="#FBFBEF">
<td>
<p> Answer </p>
</td>

<td>
<%
	  
	   if ((session.getAttribute("UserTypeId") != null && session.getAttribute("UserTypeId").toString().equals("0")))
	    
	   {        
	   %>
<bean:write name= "RatingsForm" property = "answer"/> 
<%
}
else
{
	   %>
	   <html:textarea property="submitedanswer" ></html:textarea>
	   <%
}
 %>

</td>
</tr>

<tr bgcolor="#FBFBEF">
<%
	  
	   if ((session.getAttribute("UserTypeId") != null && session.getAttribute("UserTypeId").toString().equals("0")))
	    
	   {        
	   %>
<td>
<p> Provided By: </p>
</td>
<td>
<bean:write name= "RatingsForm" property = "providername"/> 
</td>

<%
	   }
else
{
	   %>
	   <td>
	   </td>
	   <td colspan="1" align="left">
	   <html:submit> Post My Answer </html:submit>
	   </td>
	   <%
}
 %>
</tr>

<tr bgcolor="#FBFBEF">
<td>
<BR><BR><BR><BR>
</td>
<td>
</td>
</tr>

</table>

<BR><BR><BR><BR>

<%
	  
	   if ((session.getAttribute("UserTypeId") != null && session.getAttribute("UserTypeId").toString().equals("0")))
	    
	   {        
	   %>

<table width="60%" border="0" class="signup"  align="center">

<tr> 
	<td colspan="5" align="center">
		   <font size="4" color="#660099">Please Select the Rating for the Help Provider</font><br>
		  </td>
		  </tr>
<tr>
<td>
<html:radio property="rating" value="1"> 1</html:radio><html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
</td>

</tr>
<tr>
<td>
<html:radio property="rating" value="2"> 2</html:radio>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
</td>
</tr>
<tr>
<td>
<html:radio property="rating" value="3"> 3</html:radio>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
</td>
</tr>
<tr>
<td>
<html:radio property="rating" value="4"> 4</html:radio>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
</td>
</tr>
<tr>
<td>
<html:radio property="rating" value="5"> 5</html:radio>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
<html:img page="/Images/gold_star.jpg" width="2.5%" border="0"/>
</td>
</tr>



<tr> 
	<td colspan="5" align="center">
		   <html:submit>Submit</html:submit>
		  </td>
		  </tr>
 </table>
 <bean:write name= "RatingsForm" property = "ratingStatus"/>
<%
	   }
%>

 </center>
</html:form>
</html:html>

